//
//  MyLoginVC.m
//  weibo
//
//  Created by dllo on 16/6/14.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "MyLoginVC.h"



@interface MyLoginVC ()

@end

@implementation MyLoginVC

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    NSLog(@"111111");
}

- (void)viewDidLoad {
    [super viewDidLoad];
    NSLog(@"asklfkds");
    self.phoneTextF.backgroundColor = [UIColor clearColor];
    
    [self.backButton addTarget:self action:@selector(backButtonAction) forControlEvents:UIControlEventTouchUpInside];
    
    [self.regiserButton addTarget:self action:@selector(regiserButtonAction:) forControlEvents:UIControlEventTouchUpInside];
    
}

- (void)dealloc {
    [_backButton release];
    [_phoneTextF release];
    [_passWordTextF release ];
    [_regiserButton release];
    [_loginButton release];
    [_loginView release];
//    [_btn release];
    [super dealloc];
    
}
- (IBAction)BtnAction:(id)sender {
}

- (void)backButtonAction
{
    [self dismissViewControllerAnimated:YES completion:^{
        
        
    }];
}

- (void)regiserButtonAction:(UIButton *)button
{
    if (button.selected == NO) {
        [self show:self.loginView];
        self.regiserButton.titleLabel.text = @"已有账户";
        self.loginButton.titleLabel.text = @"注册";
    }else
    {
        [self hideen:self.loginView];
        self.regiserButton.titleLabel.text = @"注册账户";
        self.loginButton.titleLabel.text = @"登录";
    }
//    button.selected = !button.selected;
}



#pragma mark -- 动画展开
-(void)show:(UIView *)view
{
//    if (view == self.loginView) {
//        [self updateButton:self.cityButton selected:YES];
//    }else {
//        [self updateButton:self.monthButton selected:YES];
//    }
    [UIView animateWithDuration:0.2 animations:^{
        view.frame = CGRectMake(-WIDTH, 87, WIDTH * 2, 125);
    }];
}
-(void)hideen:(UIView *)view
{
//    [self updateButton:self.monthButton selected:NO];
//    [self updateButton:self.cityButton selected:NO];
    [UIView animateWithDuration:0.2 animations:^{
        view.frame = CGRectMake(0, 87, WIDTH * 2, 125);
        
    }];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
